#ifndef SEETAFACETOOLS_H
#define SEETAFACETOOLS_H

#include <QString>
#include "seeta/FaceDetector.h"
#include "seeta/FaceLandmarker.h"
#include "seeta/FaceRecognizer.h"
#include "opencv2/opencv.hpp"

#include "settingmodel.h"

class SeetafaceTools
{
public:
    SeetafaceTools();
    ~SeetafaceTools() {delete fdp, delete flp, delete frp;}

    bool isFace(const SeetaImageData &img);
    SeetaRect getBiggestFaceRect(const SeetaImageData& img);
    SeetaFaceInfoArray getFaceInfoArray(const SeetaImageData& img);
    std::vector<SeetaPointF> getMarkPoint(const SeetaImageData& img);
    std::shared_ptr<float>  getFaceFeatures(const SeetaImageData& img);
    float compareFace(const float* f1, const float* f2) const;
    bool isTheSamePerson(const float* f1, const float* f2) const;

public:
    seeta::FaceDetector* fdp;
    seeta::FaceLandmarker* flp;
    seeta::FaceRecognizer* frp;

private:
    SeetaFaceInfoArray check;
    SeetaFaceInfo getBiggestFaceInfo(const SeetaImageData& img);
};

#endif // SEETAFACETOOLS_H
